const app = getApp()
Page({
    data: {
        messagesList: []
    },
    onShow() {
        this.getMessages()
    },
    getMessages() {
        let diaries = app.globalData.diaries
        // let _messages = []
        // diaries.forEach(item => {
        //     let _message = {}
        //     _message.user = item.user
        //     _message.user_src = item.user_src
        //     _message.diary_name = item.diary_name
        //     _message.publish_date = item.publish_date
        //     _message.comments = item.comments
        //     _messages.push(_message)
        // });
        this.setData({
            messagesList: diaries
        })
    },
});